﻿<%@ Page ContentType="application/xml;charset=utf-8" Language="C#" %>
<script language="C#" runat="server">
    void Page_Load(object sender, EventArgs e)
    {
        foreach (string k in Request.Files.AllKeys)
        {
            HttpPostedFile file = Request.Files.Get(k);

            string name = System.IO.Path.GetFileName(file.FileName);

            file.SaveAs(Server.MapPath("./u/" + name));
        }
    }
</script>
<http>
    <request>
        <headers>
        <%foreach (string k in Request.Headers.AllKeys) { %>
            <header key="<%= k %>" value="<%= Request.Headers[k] %>" />
        <%  } %>
        </headers>
        <queryStrings>
        <%foreach (string k in Request.QueryString.AllKeys) {%>
            <queryString key="<%= k %>" value="<%= HttpUtility.UrlDecode(Request.QueryString[k]) %>" />
        <%  } %>
        </queryStrings>
        <forms>
        <%foreach (string k in Request.Form.AllKeys) {%>
            <form key="<%= k %>" value="<%= Request.Form[k] %>" />    
        <%  } %>
        </forms>
        <files>
        <%foreach (string k in Request.Files.AllKeys) { %>
            <file name="<%= k %>" fileName="<%= Request.Files[k].FileName %>" />
        <%} %>
        </files>
    </request>
</http>